//
//  FirstViewController.m
//  9.28qipao2
//
//  Created by admin on 16/9/28.
//  Copyright © 2016年 admin. All rights reserved.
//

#import "FirstViewController.h"
#import "LeftCell.h"
#import "NightCell.h"
@interface FirstViewController ()

@end

@implementation FirstViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.tableView.rowHeight = UITableViewAutomaticDimension;
    self.tableView.estimatedRowHeight = 44;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 2;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.row % 2 ==0 )
    {
        LeftCell *cell = [tableView dequeueReusableCellWithIdentifier:@"leftchell" forIndexPath:indexPath];
        cell.bubble.image = [cell.bubble.image resizableImageWithCapInsets:UIEdgeInsetsMake(30, 30, 15, 30)];
        cell.content.text = @"dcbfjbnhjbnbm,mn,ghngnn nmhnbn hchgfhghgh";
        return cell;
    }
    else
    {
        NightCell *nc = [tableView dequeueReusableCellWithIdentifier:@"nightcell" forIndexPath:indexPath];
        
        nc.bubble.image = [nc.bubble.image resizableImageWithCapInsets:UIEdgeInsetsMake(30, 30, 15, 30)];
        nc.content.text = @"xfgfcgbvvnhbvnghjnh";
        return nc;
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
